package com.example.abc.repository;

import com.example.abc.common.DataTableRequest;
import com.example.abc.dto.account.AuthorityTreeDto;
import com.example.abc.entity.Account;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import com.example.abc.entity.Authority;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Component;

@Component
@Mapper
public interface AuthorityDao {
    int insert(@Param("pojo") Authority pojo);

    int insertSelective(@Param("pojo") Authority pojo);

    int insertList(@Param("pojos") List<Authority> pojo);

    int update(@Param("pojo") Authority pojo);

    Long seachCount(@Param("req")DataTableRequest dataTableRequest);

    List<Account> seach(@Param("req")DataTableRequest dataTableRequest, RowBounds rowBounds);

    List<Authority> getAll();

    List<AuthorityTreeDto> getAllAuthTree();

    List<AuthorityTreeDto> getUserAuthTree(@Param("uid")String id);
}
